<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/TGB.Master" CodeBehind="FrmEmpresas.aspx.vb" Inherits="TGB.FrmEmpresas" 
    title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="DIV1" style="width: 100%; height: 18px; text-align: left; background-color: #ccccff;" >
    
        <asp:Label ID="LblTitulo" runat="server" CssClass="titulo" Text="Empresas" Font-Underline="False" Height="8px" Width="208px"></asp:Label>
        </div><hr /> 
    <div style="width: 99%; height: 133px; text-align: center; background-color: #efefef; vertical-align: middle;" id="DIV2">
        <table class="tabla" style="width: 776px; height: 88px; text-align: center;" >
        <tr>
            <td align="right" style="width: 19%; height: 14px;">
                Tipo de Empresa:</td>
            <td style="width: 32%; height: 14px;" align="left" ><asp:DropDownList ID="CboTEmpresa" runat="server" CssClass="CampoCbo" Width="256px" AutoPostBack="True" TabIndex="1">
                <asp:ListItem Value="-1">Seleccione un Tipo de Empresa</asp:ListItem>
                <asp:ListItem Value="0">Cliente</asp:ListItem>
                <asp:ListItem Value="1">Proveedor</asp:ListItem>
                <asp:ListItem Value="2">Entes</asp:ListItem>
            </asp:DropDownList></td>
            <td align="right" style="width: 20%; height: 14px;">
                </td>
            <td style="height: 14px; width: 120%;" align="left" >
                </td>
        </tr>
        <tr>
            <td align="right" style="width: 19%; height: 19px;">
                Razon Social:</td>
            <td style="width: 32%; height: 19px;" align="left" >
                <asp:TextBox ID="TxtRazonSocial" runat="server" CssClass="campotxt" Width="248px" TabIndex="2"></asp:TextBox></td>
            <td align="right" style="width: 20%; height: 19px;">
                <asp:Label ID="LblCuit" runat="server" CssClass="LblInfo" Height="1px" Text="C.U.I.T:"
                    Width="144px"></asp:Label></td>
            <td style="width: 120%; height: 19px;" align="left" >
                <asp:TextBox ID="TxtCUIT" runat="server" CssClass="campotxt" MaxLength="11" Width="240px" TabIndex="3"></asp:TextBox>
                <asp:Label ID="LblCuitFormato" runat="server" CssClass="LblInfo" Text="Formato Sin Guiones"
                    Width="160px" Height="8px"></asp:Label></td>
        </tr>
        <tr>
            <td align="right" style="width: 19%; height: 62px;">
                Direccion:</td>
            <td style="width: 32%; height: 62px;" align="left" >
                <asp:TextBox ID="TxtDomicilio" runat="server" CssClass="campotxt" Height="48px" MaxLength="200"
                    TabIndex="4" TextMode="MultiLine" Width="248px"></asp:TextBox></td>
            <td align="right" style="width: 20%; height: 62px;">
                Localidad:</td>
            <td style="width: 120%; height: 62px;" align="left" >
                <asp:DropDownList ID="CboProvincia" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                    CssClass="CampoCbo" TabIndex="5">
                    <asp:ListItem Value="-1">Ninguna</asp:ListItem>
                </asp:DropDownList><br />
                <br />
                <asp:DropDownList ID="CboLocalidad" runat="server" AppendDataBoundItems="True" CausesValidation="True"
                    CssClass="CampoCbo" Font-Overline="True" Height="200px" TabIndex="6" ToolTip="Seleccione una localidad"
                    Width="248px">
                    <asp:ListItem Value="-1">Seleccione una Localidad</asp:ListItem>
                </asp:DropDownList><asp:Label ID="Label3" runat="server" CssClass="LblInfo" Text="La localidad no esta Cargada??"
                    Width="184px"></asp:Label><asp:LinkButton ID="LnkCargarLocalidad" runat="server" PostBackUrl="~/Basico/FrmLocalidadABM.aspx">...</asp:LinkButton></td>
        </tr>
        <tr>
            <td align="right" style="width: 19%; height: 21px;">
                Telefono</td>
            <td align="left" style="width: 32%; height: 21px;">
                &nbsp;<asp:TextBox ID="TxtTelefono" runat="server" CssClass="campotxt" MaxLength="30"
                    TabIndex="7" Width="240px"></asp:TextBox></td>
            <td align="right" style="width: 20%; height: 21px;">
                Mail:&nbsp;</td>
            <td align="left" style="width: 120%; height: 21px;">
                <asp:TextBox ID="TxtMail" runat="server" CssClass="campotxt" Width="256px"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="right" style="width: 19%; height: 14px">
            </td>
            <td align="left" style="width: 32%; height: 14px">
            </td>
            <td align="right" style="width: 20%; height: 14px">
            </td>
            <td align="left" style="width: 120%; height: 14px">
            </td>
        </tr>
        <tr>
            <td align="right" style="width: 19%; height: 16px">
                <asp:Label ID="LblCategoriaFiscal" runat="server" CssClass="LblInfo" Height="1px"
                    Text="Categoria Fiscal" Width="88px"></asp:Label></td>
            <td align="left" style="width: 32%; height: 16px"><asp:DropDownList ID="CboCategoriaFiscal" runat="server" CssClass="CampoCbo" Width="216px" AppendDataBoundItems="True" TabIndex="8">
                <asp:ListItem Value="-1">Seleccione una Categoria</asp:ListItem>
            </asp:DropDownList></td>
            <td align="right" style="width: 20%; height: 16px">
                <asp:Label ID="LblCondicion" runat="server" CssClass="LblInfo" Height="1px" Text="Condicion de "
                    Width="144px"></asp:Label></td>
            <td align="left" style="width: 120%; height: 16px"><asp:DropDownList ID="CboCondicion" runat="server" CssClass="CampoCbo" Width="264px" AppendDataBoundItems="True" TabIndex="9">
                <asp:ListItem Value="-1">Seleccione Una Condicion</asp:ListItem>
            </asp:DropDownList></td>
        </tr>
        <tr>
            <td align="right" style="width: 19%; height: 18px">
            </td>
            <td align="left" style="width: 32%; height: 18px">
            </td>
            <td align="right" style="width: 20%; height: 18px">
            </td>
            <td align="left" style="width: 120%; height: 18px">
            </td>
        </tr>
        <tr>
            <td align="right" colspan="4" style="height: 21px; vertical-align: middle; background-color: transparent; text-align: center;" >
                &nbsp;<asp:LinkButton ID="LnkGuardar" runat="server" CssClass="BotonLink" TabIndex="10">Guardar</asp:LinkButton>
            <asp:LinkButton ID="LnkEliminar" runat="server" CssClass="BotonLink" TabIndex="-1">Eliminar</asp:LinkButton>
            <asp:LinkButton ID="LnkBuscar" runat="server" CssClass="BotonLink" TabIndex="12">Buscar</asp:LinkButton>
            <asp:LinkButton ID="LnkCancelar" runat="server" CssClass="BotonLink" TabIndex="20">Cancelar</asp:LinkButton>&nbsp;
            </td>
        </tr>
        
    </table>
        &nbsp;
        <asp:Label ID="LblErrorEmpresa" runat="server" CssClass="LabelError" Text="ErrorLbl"></asp:Label></div>
    <hr />
    <div style="width: 100%; height: 100%; background-color: #efefef">
        &nbsp; 
        <asp:GridView ID="GridCliente" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC"
            BorderWidth="1px" CellPadding="4" CssClass="tabla"
            ForeColor="Black" GridLines="Horizontal" PageSize="25" Style="width: 100%; vertical-align: middle; text-align: center;" Width="3056px" TabIndex="-3" BorderStyle="None" CellSpacing="1">
            <PagerSettings PageButtonCount="25" />
            <Columns>
                <asp:TemplateField HeaderText="CodigoCliente">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CodigoCliente") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        &nbsp;<asp:LinkButton ID="LinkVer" runat="server" CommandName="Select">Ver</asp:LinkButton>
                        <asp:HiddenField ID="HFCodigoCliente" runat="server" Value='<%# bind("CodigoCliente") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="RazonSocial">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("RazonSocial") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblRazonSocial" runat="server" Text='<%# Bind("RazonSocial") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="CUIT">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("CUIT") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblCUIT" runat="server" Text='<%# Bind("CUIT") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Direccion">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Direccion") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblDireccion" runat="server" Text='<%# Bind("Direccion") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="TelCel">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("TelCel") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblTelCel" runat="server" Text='<%# Bind("TelCel") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Mail">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("Mail") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblMail" runat="server" Text='<%# Bind("Mail") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Condicion de Venta">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("CondicionVenta") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblCondicionVenta" runat="server" Text='<%# Bind("Descripcion") %>'></asp:Label>
                        <asp:HiddenField ID="HFCondicionVenta" runat="server" Value='<%# bind("CondicionVenta") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Categoria Fiscal">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("CodigoCategoria") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblCodigoCategoria" runat="server" Text='<%# Bind("Detalle") %>'></asp:Label>
                        <asp:HiddenField ID="HFCategoriaFiscal" runat="server" Value='<%# bind("CodigoCategoria") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Localidad">
                    <ItemTemplate>
                        <asp:Label ID="LblCodigoLocalidad" runat="server" Text='<%# bind("Nombre") %>'></asp:Label>
                        <asp:HiddenField ID="HFLocalidadCliente" runat="server" Value='<%# Bind("CodigoLocalidad") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CC3333" ForeColor="White" Font-Bold="True" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
        <asp:GridView ID="GridProveedor" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC"
            BorderWidth="1px" CellPadding="4" CssClass="tabla"
            ForeColor="Black" GridLines="Horizontal" PageSize="25" Style="width: 100%; vertical-align: middle; text-align: center;" Width="3056px" TabIndex="-4" BorderStyle="None" CellSpacing="1" >
            <PagerSettings PageButtonCount="25" />
            <Columns>
                <asp:TemplateField HeaderText="CodigoProveedor">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CodigoProv") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        &nbsp;<asp:LinkButton ID="LinkVer" runat="server" CommandName="Select">Ver</asp:LinkButton>
                        <asp:HiddenField ID="HFProveedor" runat="server" Value='<%# bind("CodigoProv") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="RazonSocial">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("RazonSocial") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblRazonSocial" runat="server" Text='<%# Bind("RazonSocial") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="CUIT">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("CUIT") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblCUIT" runat="server" Text='<%# Bind("CUIT") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Direccion">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Direccion") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblDireccion" runat="server" Text='<%# Bind("Direccion") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="TelCel">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("TelCel") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblTelCel" runat="server" Text='<%# Bind("TelCel") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Mail">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("Mail") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblMail" runat="server" Text='<%# Bind("Mail") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Condicion de Compra">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("CondicionCompra") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblCondicionCompra" runat="server" Text='<%# Bind("Descripcion") %>'></asp:Label>
                        <asp:HiddenField ID="HFCondicionCompra" runat="server" Value='<%# bind("CondicionCompra") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Localidad">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("CodigoLocalidad") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblCodigoLocalidad" runat="server" Text='<%# Bind("Nombre") %>'></asp:Label>
                        <asp:HiddenField ID="HFLocalidadProveedor" runat="server" Value='<%# bind("CodigoLocalidad") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CC3333" ForeColor="White" Font-Bold="True" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
<asp:GridView ID="GridEnte" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC"
            BorderWidth="1px" CellPadding="4" CssClass="tabla"
            ForeColor="Black" GridLines="Horizontal" PageSize="25" Style="width: 100% ; vertical-align: middle; text-align: center;" Width="3056px" TabIndex="-5" BorderStyle="None" CellSpacing="1" >
            <PagerSettings PageButtonCount="25" />
            <Columns>
                <asp:TemplateField HeaderText="CodigoEnte">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CodigoEnte") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        &nbsp;<asp:LinkButton ID="LinkVer" runat="server" CommandName="Select">Ver</asp:LinkButton>
                        <asp:HiddenField ID="HFEnte" runat="server" Value='<%# bind("CodigoEnte") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="RazonSocial">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("RazonSocial") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblRazonSocial" runat="server" Text='<%# Bind("RazonSocial") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Direccion">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Direccion") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblDireccion" runat="server" Text='<%# Bind("Direccion") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="TelCel">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("TelCel") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblTelCel" runat="server" Text='<%# Bind("TelCel") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Mail">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("Mail") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblMail" runat="server" Text='<%# Bind("Mail") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Localidad">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("CodigoLocalidad") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="LblLocalidad" runat="server" Text='<%# Bind("Nombre") %>'></asp:Label>
                        <asp:HiddenField ID="HFLocalidadEnte" runat="server" Value='<%# bind("CodigoLocalidad") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CC3333" ForeColor="White" Font-Bold="True" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        </asp:GridView>

        
    </div>
    <asp:HiddenField ID="HFCliente" runat="server" />
    &nbsp;&nbsp;
    <asp:HiddenField ID="HFProveedor" runat="server" />
    <asp:HiddenField ID="HFEnte" runat="server" />
</asp:Content>
